Link Tracking Template
It enables businesses to track the number of clicks happened on any CTA button(URL only). This would help them aesthetically and with better analytics.
To track the clicks happened on any weblink, the businesses must send the template messages with dynamic CTA option only, on which they can embed the weblink so that clicks can be tracked on the same.
When sending dynamic CTA message through API, business must pass the 'longUrl' in the metadata field for which they want to track the clicks.
The creation of 'ShortURL' will be done at Sinch’s end and the 'ShortURL' will be passed as the parameter of the dynamic CTA.
Payload
{
"messages": [
{
"sender": "918882931154",
"to": "916202834496",
"channel": "wa",
"type": "template",
"body": [],
"template": {
"templateId": "checking_cloud_template",
"buttons": [
{
"index": "0",
"subType": "callToAction",
"parameters": {
"type": "text",
"text": "open me!"
}
}
],
"langCode": "en"
},
"metadata": {
"type": "trackingCta",
"data": {
"target": "https://webhook.site",
"tags": {
"appID": "sinchuat3",
"MSISDN": "916202834496",
"campaign": "droplead_loan_hlpa_na_na_na_whatsapp",
"template": "checking_cloud_template",
"key1": "value2"
}
}
}
}
],
"responseType": "json"
}
Note:- In order to use the feature of click tracking, businesses need to first create a template with dynamic CTA options on SmartTA platform, mention a pre-defined link in the CTA option and use that template only while sending messages through API.
In case the enterprises do not want to track the clicks on any link – than they can send the messages without any metadata object in the payload.